package com.cpit.qualitycontrol.dao;

import com.cpit.qualitycontrol.entity.ApkUpload;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

public interface ApkUploadRepository extends JpaRepository<ApkUpload, String>, JpaSpecificationExecutor<ApkUpload> {

    @Query("select a from ApkUpload a where id in (select max(b.id) from ApkUpload b)")
    ApkUpload queryLatestVersion();
}
